package de.general;

public class ContinueBreak {

	public static void main(String[] args) {

		// Break con For

		String frase = "Anita lava la tina";
		System.out.println(frase.length());
		for (int i = 0; i < frase.length(); i++) {
			char caracter = frase.charAt(i);

			if (caracter == 't') {
				System.out.println("Si hay t");
				break;
			}
			System.out.println(caracter);
		}

		// Break con While

		String frases = "Anita lava la tina";
		int i = 0;

		while (i < frases.length()) {
			char caracter = frases.charAt(i);

			if (caracter == 't') {

				System.out.println("Si hay t");
				break;
			}

			i++;
			System.out.println(caracter);

		}
		
		// CONTINUE
		
		String  fras = "Anita lava la tina";
        
		for( int i1 = 0 ; i1 < fras.length() ; i1++ )
		   {
		             
		    char caracter=fras.charAt(i1);
		             
		             
		    if( (caracter == 'a') ||  (caracter == 'A') )
		        {
		          continue;
		        }
		                 
		    System.out.print(caracter);
		   }

	}

}
